import socket

ip = '10.11.146.167'
port = 9999

socket_client = socket.socket(family=socket.AF_INET, type=socket.SOCK_STREAM)
socket_client.connect((ip, port))

while True:
    msg = input(">>>")
    if len(msg) == 0:
        continue
    socket_client.sendall(msg.encode())
    data = socket_client.recv(1024)
    print('服务器', data.decode())